package com.lxhotel.agentmcp.context;

import com.alibaba.ttl.TransmittableThreadLocal;

/**
 * This class function is xxx.
 *
 * @author yangbo
 * @date 2025/09/29
 */
public class WebContext {
    public static final String USER_ID_KEY = "userId";

    private static TransmittableThreadLocal<Long> USER_ID = new TransmittableThreadLocal<Long>();


    public static void setUserId(Long userId) {
        USER_ID.set(userId);
    }

    public static Long getUserId() {
        return USER_ID.get();
    }


    public static void remove() {
        USER_ID.remove();
    }

}
